﻿using System;
using System.Collections.Generic;
using System.Text;

namespace HZ.Supervise.BLL
{
    using System.Data;
    using HZ.Supervise.Model;
    public class BLL_Cache
    {
        private static Dictionary<string, Model.Area> m_DicArea = null;

        /// <summary>
        /// 地区缓存
        /// </summary>
        public static Dictionary<string, Model.Area> DicArea
        {
            get { return BLL_Cache.m_DicArea; }
            set { BLL_Cache.m_DicArea = value; }
        }
        static BLL_Cache()
        {
            m_DicArea = new Dictionary<string, HZ.Supervise.Model.Area>();
            var dt = HZ.Data.DbHelperFactory.Create().ExecuteTable("SELECT * FROM TB_Area");

            foreach (DataRow item in dt.Rows)
            {

                m_DicArea.Add(item["AreaId"].ToString(), HZ.Data.DAL_Helper.CommonFill<Area>(item));
            }

        }

        


    }
}
